<div class="wrapper">
  <?php $this->partial('Common/mainHeader');?>

  <?php $this->partial('Common/mainSiderbar');?>

  <div class="content-wrapper">
    <section class="content-header">
      <h1>资料设置<small>个人简介</small></h1>

      <ol class="breadcrumb">
        <li><a href="/"><i class="fa fa-fw fa-home"></i> 首页</a></li>
        <li> 资料设置</li>
      </ol>
    </section>
    <div class="content">
      <div class="box">
        <div class="box-header">个人简介</div>

        <div class="box-body">
          <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
              <li class="active"><a href="#tab1" data-toggle="tab">个人资料</a></li>
              <li><a href="#tab2" data-toggle="tab">其他资料</a></li>
            </ul>

            <div class="tab-content">
              <div class="tab-pane active" id="tab1">
                <?php $this->partial('UserProfile/userForm');?>
              </div>

              <div class="tab-pane" id="tab2">
                <?php $this->partial('UserProfile/userBankForm');?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <?php $this->partial('Common/mainFooter');?>
</div>

<?php $this->partial('Common/mainScript');?>

<script type="text/javascript" charset="utf-8" src="/node_modules/distpicker/dist/distpicker.min.js"></script>
<script type="text/javascript">
  $.fn.distpicker.setDefaults({
    valueType: "code"
  });

  var addressCode = "<?php echo $account_info -> address_code; ?>",
      addressCodeJson;

  if(addressCode.toString() !== '0') {
    addressCodeJson = {
      province: addressCode.substr(0,2)+'0000',
      city: addressCode.substr(0,4)+'00',
      district: addressCode
    };
  } else {
    addressCodeJson = {};
  }

  $("#distpicker").distpicker(addressCodeJson);
</script>